package com.karst.essentials.chapter06
{
	import flash.events.Event;
	
	import org.papervision3d.materials.ColorMaterial;
	import org.papervision3d.objects.DisplayObject3D;
	import org.papervision3d.objects.primitives.Plane;
	import org.papervision3d.view.BasicView;

	internal class MouseInteractionExample2 extends InteractionTemplate
	{
		private var easeOut : Number = .3 ;
		private var rotX : Number = .5 ;
		private var rotY : Number = .5 ;
		
		public function MouseInteractionExample2()
		{
			super() ;
		}

		override protected function onRenderTick(event:Event=null):void
		{
			super.onRenderTick( event ) ;
			if( grid )
			{
				grid.rotationX += ( -(mouseY - height * .5) * rotX - grid.rotationX ) * easeOut ;
				grid.rotationY += ( (mouseX - width * .5) * rotY - grid.rotationY ) * easeOut ;
			}
		}
	}
	
}